1. Technical Field
The present disclosure relates to video decoders, and more specifically to a decoder with resiliency to handle errors in receive data stream.
2. Related Art
Image frames are often required to be reconstructed from corresponding encoded data. Reconstruction refers to forming (recovering) the data, which is as close as possible to the original data from which the compressed/encoded data is formed. For example, data representing a sequence of image frames generated from a video signal capturing a scene of interest is often provided in a compressed/encoded form, typically for reducing storage space or for reducing transmission bandwidth requirements. Such a technique may necessitate the reconstruction of the scene of interest (the sequence of image frames) by uncompressing/decoding the provided data.
H.264 is an example standard according to which image frames can be represented in compressed form (thereby necessitating reconstruction). H.264 is described in further detail in ITU-T Recommendation H.264—“SERIES H: AUDIOVISUAL AND MULTIMEDIA SYSTEMS, Infrastructure of audiovisual services—Coding of moving video, Advanced video coding for generic audiovisual services”, available from TELECOMMUNICATION STANDARDIZATION SECTOR of ITU.
A decoder receives data streams encoded, formatted and transmitted according to the corresponding standard (e.g., H.264, noted above), and operates to recover (or reconstruct) the video information (e.g., video frames) contained in the received video streams. Alternatively, the data may be read by a device from a storage medium and provided to a decoder. The received data streams contain both information required to decode the stream (for example, in the form of headers or other synchronizing data patterns) as well as the actual encoded and compressed image information.
Data streams received by a decoder may contain errors due to one of several factors such as noise in transmission channels or receiver, packet loss in switching networks, storage device faults, etc. The errors may be random errors, burst errors or block loss (e.g., loss of a packet containing many bytes) depending on the specific error mechanisms. For example, if the transmission channel used to transmit a video stream is a switching network, packet loss may be the primary error type in the received (video) data stream.
Errors in a received data stream may cause one or more undesirable effects, such as loss of decoder's synchronization with the transmitter, faulty transition of the decoder to a different decoding state, etc., and generally results in incorrect decoding and faulty rendering of the transmitted images at the receiver. The extent to which the errors affect the decoder in reconstructing the transmitted data may depend on (among other factors) the specific position (whether in a data portion or a header portion, etc.) in the data stream of the corrupted bits. Errors in a header portion, for example, may cause a decoder to enter into a wrong decoding state, from which the decoder may not be able to recover.
Some prior H.264 decoders handle errors in received data streams by stopping the decode operations as soon as error is detected in the stream. Decoding may be resumed when a decoder ‘reset’ state is reached (for example, when an IDR type of frame is received next in H.264 standard). However, if errors are frequent, or a decoder reset command is not received by the decoder, the above approach may result in no decoding of valid data. An alternative approach may ignore such errors and continue decoding the data stream, in which case, the decoder may enter a wrong decoding state, and may not be able to recover from the errors.
Several aspects of the present invention enable error resiliency (tolerance to errors, for example, by recovering) in decoding such data streams.